<template>
  <div class="route">
    <mt-header title="我的路线"></mt-header>
    <div class="isGuide" v-if="isGuide">
      <h3 class="route-title">我是导游</h3>
      <my-ul>
        <router-link to="/addRouteService">
          <my-li class="route-li">
            <div class="icon-swapper">
              <div slot="icon" class="iconfont">&#xe635;</div>
            </div>
            <p class="around-img-title">发布路线服务</p>
          </my-li>
        </router-link>
        <my-li class="route-li">
          <div class="icon-swapper">
            <div slot="icon" class="iconfont">&#xe61c;</div>
          </div>
          <p class="around-img-title">我发布的服务</p>
        </my-li>

        <my-li class="route-li">
          <div class="icon-swapper">
            <div slot="icon" class="iconfont">&#xe618;</div>
          </div>
          <p class="around-img-title">我服务的路线</p>
        </my-li>
      </my-ul>
    </div>
    <div class="isTourist">
      <h3 class="route-title">我是游客</h3>
      <my-ul>
        <router-link to="/addRouteDemand">
          <my-li class="route-li">
            <div class="icon-swapper">
              <div slot="icon" class="iconfont">&#xe635;</div>
            </div>
            <p class="around-img-title">发布路线需求</p>
          </my-li>
        </router-link>
        <my-li class="route-li">
          <div class="icon-swapper">
            <div slot="icon" class="iconfont">&#xe848;</div>
          </div>
          <p class="around-img-title">我发布的需求</p>
        </my-li>

        <my-li class="route-li">
          <div class="icon-swapper">
            <div slot="icon" class="iconfont">&#xe65d;</div>
          </div>
          <p class="around-img-title">我参加的路线</p>
        </my-li>
      </my-ul>
    </div>
  </div>
</template>
<script>
export default {
  name: "Route",
  data() {
    return {
      isGuide:false
    };
  },
  mounted() {
    if(this.$store.state.user.isGuide == 1) {
      this.isGuide = true;
    }
  }
};
</script>
<style lang="stylus" scoped>
@import '~@/assets/style/variable.styl';

// .mint-header>>>.mint-header-title {
// font-size: 0.4rem;
// }
.route {
  // background-color: #efefef;
  height: 100%;

  .isGuide {
    padding-bottom: 0.3rem;
    border-bottom: 5px solid #eee;
    background-color #fff;
  }

  .isTourist{
    padding-bottom: 0.3rem;
    border-bottom: 5px solid #eee;
    background-color #fff
  }

  .route-title {
    font-weight: bolder;
    font-size: 0.36rem;
    padding: 0.3rem 0.3rem 0;
  }

  .route-li {
    // background-color: pink;
    text-align: center;
    padding-top: 0.3rem;

    .icon-swapper {
      background-color: $themeColor;
      width: 1rem;
      height: 1rem;
      border-radius: 0.5rem;
      overflow: hidden;
      margin: 0 auto;
      line-height: 1rem;
      box-shadow: 0px 0px 5px 2px rgba(0, 0, 0, 0.2);

      .iconfont {
        font-size: 0.6rem;
        color: #fff;
        text-align: center;
      }
    }

    .around-img-title {
      margin-top: 0.2rem;
    }
  }
}
</style>